<%@page import="com.lei.s04session.util.DateUtil"%>
<%@page import="java.util.Optional"%>
<%@page import="com.lei.s04session.entity.LoginLog"%>
<%@page import="com.lei.sqlGoodsJsp.entity.LoginUserEntity"%>
<%@page import="com.lei.sqlGoodsJsp.entity.Page"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
		Page<LoginLog> pageCard = (Page<LoginLog>) request.getAttribute("page");
	%>
		<%="数据量"+pageCard.getCount() %>
		<%="    当前登陆用户"+session.getAttribute("loginInfo") %>
		<table border="1" width="700px">
		<tr>
			<td>ID</td>
			<td>登录用户</td>
			<td>登录用户昵称</td>
			<td>登录IP</td>
			<td width="120px">登录状态</td> 
			<td width="280px">登录时间</td>
		</tr>
		<%for (LoginLog card : pageCard.getData()) {
			 %>	
			<tr>
			<td>
			<%=card.getId() %>
			</td>
			<td>
			<%=card.getUserName()%>
			</td>
			<td>
			<%=card.getNickName()==null?"":card.getNickName()%>
			</td>
			<td>
			<%=card.getIp() %>
			</td>
			<td>
			<%="1".equals(card.getStatus())?"成功":"失败"%>
			</td>
			<td>
			<%=DateUtil.formart(card.getCreateTime()) %>
			</td>
			</tr>
			<%
		}
		 %>
		
		</table>
		 <%for (int i=1;i<=pageCard.getTotalPage();i++){
			if(i==pageCard.getCurrentPage()){
				//abc"
				String abc ="abc\"";
				out.print("  "+i);
			}else{
				out.print("  <a href =\"LoginLogServlet?method=list&currentPage="+i+"\">"+i+"</a>");
			}
		} %>

</body>
</html>